package cn.sail.spring.aop.proxy;

public class XmlAdvice {
    //方法执行之前开启事务，打印日志
    public void before(){
        System.out.println("log start");
        System.out.println("开启事务");
    }

    //方法正常执行之后提交事务
    public void afterReturning(){
        System.out.println("提交事务");
    }

    //方法异常执行之后回滚事务
    public void afterThrowing(){
        System.out.println("事务回滚");
    }

    //方法执行完之后
    public void after(){
        System.out.println("log end");
    }
}
